package com.leaf.guidesdemos;

import android.app.NotificationManager;
import android.app.Service;
import android.content.Intent;
import android.os.Handler;
import android.os.IBinder;
import android.os.Message;
import android.os.Messenger;

public class MessengerService extends Service {
	
	NotificationManager mNm;
	
	class IncomingHandler extends Handler{
		
		@Override
		public void handleMessage(Message msg) {
			super.handleMessage(msg);
		}
		
	}
	
	final Messenger mMessenger=new Messenger(new IncomingHandler());
	
	@Override
	public void onCreate() {
		
		mNm=(NotificationManager) getSystemService(NOTIFICATION_SERVICE);
		
		showNotification();
	}

	private void showNotification() {
		getText(R.string.remote_service_started);
		
		
	}

	@Override
	public IBinder onBind(Intent intent) {
		return mMessenger.getBinder();
	}
	
	@Override
	public void onDestroy() {
		// TODO Auto-generated method stub
		super.onDestroy();
	}

}
